package com.kamistoat.meimeichatserveraggrement.protocol.msg;

import com.kamistoat.meimeichatserveraggrement.protocol.Command;
import com.kamistoat.meimeichatserveraggrement.protocol.Packet;

import java.util.Date;

/**
 * 群组消息响应.
 * 注意和私聊消息响应其实内容完全一样。之所以写两个，是为了匹配Handler用的，要不然Handler还得对同类型的Request做判断，判断到底是群组还是私聊
 */
public class MsgGroupResponse extends Packet {

    private String userId;      // 消息发送者ID
    private String userNickname;// 消息发送者昵称
    private String userHead;    // 消息发送者头像
    private String talkId;      // 对话框ID[群号]
    private String msgText;         // 消息内容
    private Integer msgType;     // 消息类型；0文字消息、1固定表情
    private Date msgDate;       // 发送消息时间

    public MsgGroupResponse() {
    }

    public MsgGroupResponse(String talkId, String userId, String userNickname, String userHead, String msgText, Integer msgType, Date msgDate) {
        this.talkId = talkId;
        this.userId = userId;
        this.userNickname = userNickname;
        this.userHead = userHead;
        this.msgText = msgText;
        this.msgType = msgType;
        this.msgDate = msgDate;
    }

    public String getTalkId() {
        return talkId;
    }

    public void setTalkId(String talkId) {
        this.talkId = talkId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserNickname() {
        return userNickname;
    }

    public void setUserNickname(String userNickname) {
        this.userNickname = userNickname;
    }

    public String getUserHead() {
        return userHead;
    }

    public void setUserHead(String userHead) {
        this.userHead = userHead;
    }

    public String getMsgText() {
        return msgText;
    }

    public void setMsgText(String msgText) {
        this.msgText = msgText;
    }

    public Integer getMsgType() {
        return msgType;
    }

    public void setMsgType(Integer msgType) {
        this.msgType = msgType;
    }

    public Date getMsgDate() {
        return msgDate;
    }

    public void setMsgDate(Date msgDate) {
        this.msgDate = msgDate;
    }

    @Override
    public Byte getCommand() {
        return Command.MsgGroupResponse;
    }
}
